import java.util.Scanner;
public class NestedIf {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
	// 	double score = scanner.nextDouble();
	// 	if(score > 8.0){
	// 		System.out.println("请输入性别：")
	// 		char gender = scanner.next().charAt(0);
	// 		if(gender == '男'){
	// 			System.out.println("进入男子组");
	// 		}else if(gender == '女'){
	// 			SYsytem.out.println("进入女子组");
	// 		}else{
	// 			System.out.println("输入性别错误");
	// 		}
	// 	}else{
	// 		System.out.println("很遗憾，未能进入决赛");
	// 	}
	// }



	String season = scanner.next();
	int price = 60;
	int price1 = 40;
	if("旺季".equals(season)){
			int age = scanner.nextInt();
		if(age > 60){
			System.out.println("票价为：" + price / 3);
		}else if(age >= 18){
			System.out.println("票价为：" + price);
		}else if(age > 0){
			System.out.println("票价为：" + price / 2);
		}else{
			System.out.println("年龄非法");
		}
	}else if("淡季".equals(season)){
			int age = scanner.nextInt();
		if(age >= 18 && age <= 60){
			System.out.println("票价为：" + price1);
		}else if(age > 0){
			System.out.println("票价为：" + price1 / 2);
		}else{
			System.out.println("年龄非法");
		}
	}else{
		System.out.println("季节非法");
	}
	}
}